package hu.issue.framework.web.servlet;

import hu.issue.framework.web.Constants;

import javax.servlet.ServletContext;

class ContextUtil {

	public static ControllerMapper getControllerMapper(final ServletContext context) {
		return (ControllerMapper) context.getAttribute(Constants.MAPPER_ATTRIBUTE);
	}

	public static ControllerRegistry getControllerRegistry(final ServletContext context) {
		return (ControllerRegistry) context.getAttribute(Constants.REGISTRY_ATTRIBUTE);
	}

	public static ViewHandler getViewHandler(final ServletContext context) {
		return (ViewHandler) context.getAttribute(Constants.VIEWHANDLER_ATTRIBUTE);
	}
}
